#include "mythread.h"
#include<QDebug>


Mythread::Mythread(qintptr p_sock, QObject *parent)
{
    parent = nullptr;
    this->ptr = p_sock;
}

Mythread::~Mythread()
{

}

void Mythread::run()
{
    m_socket=new Mysocket(ptr);
    connect(m_socket,SIGNAL(disconnected()),this,SLOT(quit()));
    connect(m_socket,SIGNAL(dataReady(char *)),this,SIGNAL(dataReady(char*)));

    //m_socket->forwordData();
    this->exec();

}




